const ora = require('ora');

// 出现加载图标
const spinner = ora(`Downloading...\n`);

spinner.start();
setTimeout(() => {
    spinner.color = 'yellow';
    spinner.text = 'Loading haha~';
    spinner.prefixText = '即将结束~';
}, 5000);
setTimeout(() => {
    spinner.prefixText = '';
    spinner.succeed(`succeed!\n`);
}, 10000);